<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../jquery-3.1.1.js"></script>
</head>

<body>
    <input type="text" name="" id="kxf">
    <button>点击</button>
</body>
<script>
    // document.domain = 'exam.cn';
    // document.Cookie = "name=value";
    $(function () {
        $('button').click(function () {
            let urll = 'http://v.juhe.cn/toutiao/index';
            let leixing = 'top';
            let keyy = '504d32f209a596dc6e973984ead4a11b';
            let kxf = $('#kxf').val();

            $.ajax({
                type: 'get',
                url: urll,
                dataType: 'jsonp',
                crossDomain: true,
                async: true,
                data: {
                    'type':leixing,
                    'key': keyy
                    
                    
                },
                jsonpCallback:"dataFunction",
                success:function(data){
                    console.log(data)
                },

                error: function (err) {
                    console.log(2)
                    console.log(err)
                }
                
            })
            

        })
    })
</script>

</html>